package com.szholly.pro.watergas_server.ps.data;

import java.util.HashMap;

import com.szholly.data.general.metadata.table.DefulatDomainTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;import com.szholly.data.general.Field;import com.szholly.data.general.InterceptorTableBase;import com.szholly.data.general.metadata.IBaseTable;import com.szholly.utils.spring.SpringBeanFactory;import org.springframework.stereotype.Component;import com.szholly.data.general.GlobalDataType;import com.szholly.data.general.RowBase;
/**
 * PhoneSystemData
 */
@Component("PhoneSystemData")
public class PhoneSystemDataTable extends InterceptorTableBase  implements IBaseTable{

	public final static String TABLE_NAME = "PHONE_SYSTEM_DATA";



	@Autowired
	private static SpringBeanFactory springBeanFactory;
	
	/**
	 * single ref
	 */
	public static PhoneSystemDataTable getSingleRef() {
		return (PhoneSystemDataTable) SpringBeanFactory.getBean("PhoneSystemData");
	}

	@Override
	public String getMetadataTableName() {
		return TABLE_NAME;
	}

	@Override
	public String getMetadataTableAliasName() {
		return "PhoneSystemData";
	}

	private HashMap<String, Field> fields;

	@Override
	protected HashMap<String, Field> fields() {
		if (fields == null) {
			fields = new HashMap<String, Field>();

			Field itemField = null;
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_Guid);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(5);
			itemField.setFieldAliasName("GUID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_UserId);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(6);
			itemField.setFieldAliasName("用户编号");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_VersionCode);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(7);
			itemField.setFieldAliasName("系统版本号");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_Width);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(8);
			itemField.setFieldAliasName("屏幕宽度(单位：像素)");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_Model);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(9);
			itemField.setFieldAliasName("手机型号");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_Height);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(11);
			itemField.setFieldAliasName("屏幕高度(单位：像素)");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_DeviceCode);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(12);
			itemField.setFieldAliasName("手机唯一编码");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_Brand);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(13);
			itemField.setFieldAliasName("手机品牌");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_Density);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(14);
			itemField.setFieldAliasName("屏幕密度");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_VersionName);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(15);
			itemField.setFieldAliasName("系统版本名称");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_Hz);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(16);
			itemField.setFieldAliasName("频率");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(PhoneSystemDataRow.FIELD_CreateTime);
			itemField.setDataType(GlobalDataType.DateTime);
			itemField.setFieldID(17);
			itemField.setFieldAliasName("创建时间");
			itemField.setAllowNull(true);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
		}
		return fields;
	}

	@Override
	public String getTableGroup() {
		return "PhoneSystemData";
	}
}